﻿namespace tools.office.npoi
{
    /// <summary>
    /// 行信息模型
    /// </summary>
    public class RowInfo
    {
        /// <summary>
        /// 行索引（从 0 开始）
        /// </summary>
        public int Index { get; set; }

        /// <summary>
        /// 行高
        /// </summary>
        public float Height { get; set; }
    }

    /// <summary>
    /// 列信息模型
    /// </summary>
    public class ColInfo
    {
        /// <summary>
        /// 标题
        /// </summary>
        public string Title { get; set; } = null!;

        /// <summary>
        /// 列宽
        /// </summary>
        public double Width { get; set; }
    }

    /// <summary>
    /// 一行标题列信息模型
    /// </summary>
    public class OneRowTitleColumnInfo
    {
        /// <summary>
        /// 主标题
        /// </summary>
        public string Title { get; set; } = null!;

        /// <summary>
        /// 列宽
        /// </summary>
        public double Width { get; set; }

        /// <summary>
        /// 是否使用彩色样式
        /// </summary>
        public bool IsColored { get; set; }
    }

    /// <summary>
    /// 两行标题列信息模型
    /// </summary>
    public class TwoRowTitleColumnInfo
    {
        /// <summary>
        /// 主标题
        /// </summary>
        public string Title { get; set; } = null!;

        /// <summary>
        /// 行跨度（用于行合并）
        /// </summary>
        public int RowSpan { get; set; } = 1;

        /// <summary>
        /// 列跨度（用于列合并）
        /// </summary>
        public int ColSpan { get; set; } = 1;

        /// <summary>
        /// 列宽
        /// </summary>
        public double Width { get; set; }

        /// <summary>
        /// 是否使用彩色样式
        /// </summary>
        public bool IsColored { get; set; }

        /// <summary>
        /// 副标题列表
        /// </summary>
        public List<ColInfo>? SubTitles { get; set; }
    }

    /// <summary>
    /// 数据列信息模型
    /// </summary>
    public class DataColumnInfo
    {
        /// <summary>
        /// DataTable 列名
        /// </summary>
        public string FieldName { get; set; } = null!;

        /// <summary>
        /// 列跨度（用于列合并）
        /// </summary>
        public int ColSpan { get; set; } = 1;

        /// <summary>
        /// 是否使用彩色样式
        /// </summary>
        public bool IsColored { get; set; }
    }
}
